Optimal. Leaf size=74 \[ -\frac {(a-b) \log (\cos (e+f x))}{f}-\frac {(a-b) \tan ^2(e+f x)}{2 f}+\frac {(a-b) \tan ^4(e+f x)}{4 f}+\frac {b \tan ^6(e+f x)}{6 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3712, 3554,
3556} \begin {gather*} \frac {(a-b) \tan ^4(e+f x)}{4 f}-\frac {(a-b) \tan ^2(e+f x)}{2 f}-\frac {(a-b) \log (\cos (e+f x))}{f}+\frac {b \tan ^6(e+f x)}{6 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3554
Rule 3556
Rule 3712
Rubi steps
\begin {align*} \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=\frac {b \tan ^6(e+f x)}{6 f}+(a-b) \int \tan ^5(e+f x) \, dx\\ &=\frac {(a-b) \tan ^4(e+f x)}{4 f}+\frac {b \tan ^6(e+f x)}{6 f}+(-a+b) \int \tan ^3(e+f x) \, dx\\ &=-\frac {(a-b) \tan ^2(e+f x)}{2 f}+\frac {(a-b) \tan ^4(e+f x)}{4 f}+\frac {b \tan ^6(e+f x)}{6 f}+(a-b) \int \tan (e+f x) \, dx\\ &=-\frac {(a-b) \log (\cos (e+f x))}{f}-\frac {(a-b) \tan ^2(e+f x)}{2 f}+\frac {(a-b) \tan ^4(e+f x)}{4 f}+\frac {b \tan ^6(e+f x)}{6 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 63, normalized size = 0.85 \begin {gather*} \frac {12 (-a+b) \log (\cos (e+f x))-6 (a-b) \tan ^2(e+f x)+3 (a-b) \tan ^4(e+f x)+2 b \tan ^6(e+f x)}{12 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 79, normalized size = 1.07
method | result | size |
norman | \(\frac {b \left (\tan ^{6}\left (f x +e \right )\right )}{6 f}-\frac {\left (a -b \right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}+\frac {\left (a -b \right ) \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {\left (a -b \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f}\) | \(73\) |
derivativedivides | \(\frac {\frac {b \left (\tan ^{6}\left (f x +e \right )\right )}{6}+\frac {a \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {b \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {a \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {b \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {\left (a -b \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}}{f}\) | \(79\) |
default | \(\frac {\frac {b \left (\tan ^{6}\left (f x +e \right )\right )}{6}+\frac {a \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {b \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {a \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {b \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {\left (a -b \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}}{f}\) | \(79\) |
risch | \(i x a -i x b +\frac {2 i a e}{f}-\frac {2 i b e}{f}-\frac {2 \left (6 a \,{\mathrm e}^{10 i \left (f x +e \right )}-9 b \,{\mathrm e}^{10 i \left (f x +e \right )}+18 a \,{\mathrm e}^{8 i \left (f x +e \right )}-18 b \,{\mathrm e}^{8 i \left (f x +e \right )}+24 a \,{\mathrm e}^{6 i \left (f x +e \right )}-34 b \,{\mathrm e}^{6 i \left (f x +e \right )}+18 a \,{\mathrm e}^{4 i \left (f x +e \right )}-18 b \,{\mathrm e}^{4 i \left (f x +e \right )}+6 a \,{\mathrm e}^{2 i \left (f x +e \right )}-9 b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{6}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a}{f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) b}{f}\) | \(202\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 105, normalized size = 1.42 \begin {gather*} -\frac {6 \, {\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {6 \, {\left (2 \, a - 3 \, b\right )} \sin \left (f x + e\right )^{4} - 3 \, {\left (7 \, a - 9 \, b\right )} \sin \left (f x + e\right )^{2} + 9 \, a - 11 \, b}{\sin \left (f x + e\right )^{6} - 3 \, \sin \left (f x + e\right )^{4} + 3 \, \sin \left (f x + e\right )^{2} - 1}}{12 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.43, size = 71, normalized size = 0.96 \begin {gather*} \frac {2 \, b \tan \left (f x + e\right )^{6} + 3 \, {\left (a - b\right )} \tan \left (f x + e\right )^{4} - 6 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} - 6 \, {\left (a - b\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{12 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.18, size = 116, normalized size = 1.57 \begin {gather*} \begin {cases} \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} - \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {b \tan ^{6}{\left (e + f x \right )}}{6 f} - \frac {b \tan ^{4}{\left (e + f x \right )}}{4 f} + \frac {b \tan ^{2}{\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1719 vs.
\(2 (72) = 144\).
time = 3.71, size = 1719, normalized size = 23.23 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.71, size = 68, normalized size = 0.92 \begin {gather*} \frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {a}{4}-\frac {b}{4}\right )-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a}{2}-\frac {b}{2}\right )+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^6}{6}+\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________